package com.fy.dishimei.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 * 用户信息
 * @TableName sys_user
 */
@TableName(value ="sys_user")
@Data
public class SysUser implements Serializable {
    /**
     * 用户编码
     */
    @TableId
    private String suCode;

    /**
     * 分类编码
     */
    private String susCode;

    /**
     * 用户姓名
     */
    private String suName;

    /**
     * 性别：0未知，1男，2女
     */
    private Integer suSex;

    /**
     * 年龄
     */
    private Integer suAge;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        SysUser other = (SysUser) that;
        return (this.getSuCode() == null ? other.getSuCode() == null : this.getSuCode().equals(other.getSuCode()))
            && (this.getSusCode() == null ? other.getSusCode() == null : this.getSusCode().equals(other.getSusCode()))
            && (this.getSuName() == null ? other.getSuName() == null : this.getSuName().equals(other.getSuName()))
            && (this.getSuSex() == null ? other.getSuSex() == null : this.getSuSex().equals(other.getSuSex()))
            && (this.getSuAge() == null ? other.getSuAge() == null : this.getSuAge().equals(other.getSuAge()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getSuCode() == null) ? 0 : getSuCode().hashCode());
        result = prime * result + ((getSusCode() == null) ? 0 : getSusCode().hashCode());
        result = prime * result + ((getSuName() == null) ? 0 : getSuName().hashCode());
        result = prime * result + ((getSuSex() == null) ? 0 : getSuSex().hashCode());
        result = prime * result + ((getSuAge() == null) ? 0 : getSuAge().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", suCode=").append(suCode);
        sb.append(", susCode=").append(susCode);
        sb.append(", suName=").append(suName);
        sb.append(", suSex=").append(suSex);
        sb.append(", suAge=").append(suAge);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}